<div class="wrapper">
  <h1><%= link_to "All Cities", :action => 'list'%> &raquo; <%= @city.name if @city %></h1>

  <div class="main">

    <div class="filter">
      <% form_tag :action => "spots_by_distance" do -%>
        <%= hidden_field_tag :city, @city.name %>

        <label for="distance">Radius:</label>
        <%= text_field_tag :distance, params[:distance], {:size => 2} %>
        <br/>

        <label for="namefragment">Name:</label>
        <%= text_field_tag :namefragment, params[:namefragment], {:size => 8} %>
        <br/>


        <%= submit_tag "Search" %>
      <% end -%>
    </div>

    <div class="map" id="map_div" style=height:400px"/>
  </div>

</div> <!-- end wrapper -->

<h3>Spots</h3>

<ol>
  <% @spots.each do |spot| %>
    <li>
      <%= link_to spot.name, spot_url(:city => spot.city.normalized_name, :id => spot) %> 
      located at <%= spot.address %> 
      [ <%= spot.latitude %>, <%= spot.longitude %>]
    </li>
  <% end %>
</ol>

<p class="footer">
  <%= link_to 'Edit', :action => 'edit', :id => @city %> |
  <%= link_to 'Back', :action => 'list' %>
</p>
